/**
 * 文件
 */
(function(hybrid){

    hybrid.plugin.video = {

        /**
         * 文件上传
         * @param options
         * @param callback
         */
        record: function(options, callback){

            options = hybrid.utils.extend({
                minTime: 2,
                maxTime: 30
            }, options);
            hybrid.callAction("VideoCapture/record",options, function(result){
                typeof callback === 'function' && callback(result.status, result.data);
            });
        },

        playVideo: function(options, callback){
            var url = '';
            if(typeof options === 'string'){
                url = options;
                options = null;
            }
            options = hybrid.utils.extend({
                url: url
            }, options || {});

            hybrid.callAction("VideoCapture/play",options, function(result){
                typeof callback === 'function' && callback(result.status, result.data);
            });
        }
    }

})(Hybrid || {});
